//
// Created by Ivor_ on 2023/2/6.
//

#ifndef PHYSICAL_COMPUTING_PACKAGE_COMPLEXVARIABLE_H
#define PHYSICAL_COMPUTING_PACKAGE_COMPLEXVARIABLE_H

#include <math.h>
#include <complex.h>

#include "../plotInFiles/plotBMP.h"

/**
 * @author Ivor
 * @param fileName Output BMP file name, suffix .bmp will be auto add.
 * @param plotLimit If plot limit set to a number "a" (MUST to be POSITIVE), the picture will show the area of -a-ai ~ a+ai with 10% edge around.
 * @param mm Iteration argument, for ordinary mm equals to 2, else mm > 2.
 * @param iterConst Z' = cpow(Z,mm) + C, for Julia set, this refers to C and initiallized Z ergodic all picture; for Mandelbrot set, this refers to Z and initiallized C ergodic all.
 * @remark Some points will out of the picture, please try again with a bigger limit argument.
 */
void juliaSet(char* fileName, double plotLimit, int mm, _Complex double iterConst);
void mandelbrotSet(char* fileName, double plotLimit, int mm, _Complex double iterConst);

#endif //PHYSICAL_COMPUTING_PACKAGE_COMPLEXVARIABLE_H
